{% extends 'usercenter-base.html' %}
{% load staticfiles %}
{% block custom_css %}
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">

<link rel="stylesheet" type="text/css" href="{% static '' %}css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="{% static '' %}css/muke/course/common-less.css">
{% load filter %}
{% endblock %}
{% block custom_bread %}
     <section>
        <div class="wp">
            <ul  class="crumbs">
                <li><a href="{% url 'index' %}">首页</a>></li>
                <li><a href="{% url 'users:info' %}">个人中心</a>></li>
                <li >成绩列表</li>
            </ul>
        </div>
    </section>
{% endblock %}
{% block rigt_form %}
         <div class="right">
            <div class="personal_des Releasecont">
                <div class="head">
                    <h1>成绩统计</h1>
                </div>
            </div>
            <div class="personal_des permessage">
                <div class="head">
                    <ul class="tab_header messagehead">
                      <li ><a href="{% url 'users:my_grade_classfication' %}">作业成绩区间统计</a></li>
                         <li><a href="{% url 'users:my_discuss_charts' %}">话题讨论次数统计</a></li>
                        <li class="active"><a href="">成绩列表</a></li>
                         <li><a href="{% url 'users:my_discuss_list' %}">话题人数</a></li>
                    </ul>
                </div>
              <div class="companycenter" >
                     <a href="/users/my_score_list/">返回 </a>
                    <div class="messagelist" style="text-align: center;">
                        <span style="color: black; font-size: 20px">{{ data.courseinfo.coursename }} {{ data.courseinfo.homeworkname }} 成绩表</span>
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th scope="col">ID</th>
                                <th scope="col">用户名</th>
                                <th scope="col">姓名</th>
                                <th scope="col">成绩</th>
                                <th scope="col">提交时间</th>
                            </tr>
                            </thead>
                            <tbody>
                                  {% for item in user_score_list %}
                                <tr>
                                <th scope="row">{{ item.id }}</th>
                                <td>{{ item.user.username }}</td>
                                    <td>{{ item.user.nick_name }}</td>
                                <td>{{ item.score }}</td>
                                <td>{{ item.addtime }}</td>
                            </tr>
                        {% endfor %}


                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="pageturn pagerright">
                    <ul class="pagelist">
             {% if user_score_list.has_previous  %}
                 <li class="long"><a href="?page={{user_score_list.previous_page_number}}">上一页</a></li>
            {%endif%}

                {% for i in   user_score_list.paginator.page_range %}
                 {%if i == user_score_list.number  %}
                     <li class="active"><a href="?page={{ i }}&id={{ data.id }}">{{i }}</a></li>
                    {% else %}
                      <li><a href="?page={{ i }}&id={{ data.id }}" class="page">{{ i }}</a></li>
                    {% endif %}
                {% endfor %}
                {% if user_score_list.has_next  %}
                 <li class="long"><a href="?page={{user_score_list.next_page_number}}">下一页</a></li>
            {%endif%}
            </ul>
                </div>
            </div>
        </div>

{% endblock %}




